<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('采购单详情')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-brand-edit" th:object="${purchase}">
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">采购单编号：</label>
                    <div class="col-sm-8">
                        <input name="purId"  class="form-control" type="text" maxlength="30" readonly th:value="*{purId}">
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">采购时间：</label>
                    <div class="col-sm-8">
                          <input name="purTime"   class="form-control"  type="text" readonly  th:value="${#dates.format(purchase.purTime,'yyyy-MM-dd')}">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">创建人：</label>
                    <div class="col-sm-8">
                        <input name="sysUser.userName" class="form-control" type="text" readonly th:value="${purchase.sysUser.userName}" >
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">审核状态：</label>
                    <div class="col-sm-8">
<!--                        <input name="status" class="form-control" type="text" maxlength="30" readonly th:value="*{status}">-->
                        <select name="status" class="form-control" maxlength="30" disabled>
                            <option th:selected="${purchase.status} eq 1" >未审核</option>
                            <option th:selected="${purchase.status} eq 2" >审核中</option>
                            <option th:selected="${purchase.status} eq 3" >审核通过</option>
                            <option th:selected="${purchase.status} eq 4" >审核未通过</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">审核人：</label>
                    <div class="col-sm-8">
                        <input  name="sysUser1.userName"  class="form-control" type="text" readonly th:value="${purchase.sysUser1.userName}">
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">审核时间：</label>
                    <div class="col-sm-8">
                        <input  name="checkTime"  class="form-control" type="text" readonly th:value="${#dates.format(purchase.checkTime,'yyyy-MM-dd')}">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">总金额：</label>
                    <div class="col-sm-8">
                        <input  name="total"  class="form-control" type="text" readonly th:value="${purchase.total}" >
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <label class="col-xs-2 control-label">审核意见：</label>
                    <div class="col-xs-10">
                        <textarea name="opinion" maxlength="500" class="form-control" rows="3" readonly th:text="${purchase.opinion}"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    // var prefix = ctx + "purchase/repo";
    // $("#form-brand-edit").validate({
    //     focusCleanup: true
    // });
    //
    // function submitHandler() {
    //     if ($.validate.form()) {
    //         $.operate.save(prefix + "/details", $('#form-brand-edit').serialize());
    //     }
    // }
    //
    // $("input[name='createTime']").datetimepicker({
    //     format: "yyyy-mm-dd",
    //     minView: "month",
    //     autoclose: true
    // });
</script>
</body>
</html>